#pragma once
#include "global.h"

typedef struct
{
	int LTrue,LFalse;
	int LBegin,LNext;
	int is_stmt; /*is bool or not*/
} CodeStruct;

class cgen
{
public:
	cgen(void);
	~cgen(void);
	static void codeGen(TreeNode*syntaxTree);
	static void genStmt(TreeNode * tree,CodeStruct * S);
	static char * genExp(TreeNode * tree,CodeStruct * S);
	static char * cGen(TreeNode * tree,CodeStruct *Lcode);/* prototype for internal recursive code generator */
};
